<template>
  <el-input :value="value" :placeholder="placeholder" @input="updateValue" v-on="$listeners" v-bind="$attrs" :disabled="!editable"/>
</template>

<script>
import { exportWidthInfo } from "../../utils";
export default {
  name: "v-text",
  props: {
    value: [String, Number],
    options: {
      type: Object,
      required: true
    },
    editable:Boolean
  },
  data() {
    return {
      placeholder: this.options.placeholder,
    };
  },
  methods: {
    updateValue(val) {
      this.$emit("input", val);
    }
  },
  created() { 
    this.$emit("dispatch-width", exportWidthInfo(this.options.display));
  }
};
</script>

<style>

</style>
